package com.shupian.controller;


import com.shupian.domain.ResponseResult;
import com.shupian.service.UploadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@Api(tags = "上传相关接口")
@RestController
public class UploadController {
    @Autowired
    private UploadService uploadService;
    @ApiOperation("上传图片")
    @PostMapping("/upload")
    public ResponseResult uploadImg(MultipartFile img){
        return uploadService.iploadImg(img);
    }
}
